﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;

namespace IntoStationSystem.Models
{
    public class ProductIdentity
    {
        public DateTime DateTime { get; set; }
        public string ProductMode { get; set; }
        [Key]
        public string TrayId { get; set; }
        public string Result { get; set; }
        public bool IsRepair { get; set; }
        public string OP10PartCode1 { get; set; }
        public string OP10PartCode2 { get; set; }
        public string OP10Result { get; set; }
        public string OP20PartCode { get; set; }
        public int OP20Torque1 { get; set; }
        public int OP20Torque2 { get; set; }
        public int OP20Angle1 { get; set; }
        public int OP20Angle2 { get; set; }
        public string OP20Result { get; set; }
        public string OP30PartCode { get; set; }
        public int OP30Torque1 { get; set; }
        public int OP30Torque2 { get; set; }
        public int OP30Torque3 { get; set; }
        public int OP30Torque4 { get; set; }
        public int OP30Angle1 { get; set; }
        public int OP30Angle2 { get; set; }
        public int OP30Angle3 { get; set; }
        public int OP30Angle4 { get; set; }
        public string OP30Result { get; set; }
        public int OP50Voltage { get; set; }
        public int OP50Current { get; set; }
        public int OP50Frequency { get; set; }
        public int OP50Duty { get; set; }
        public int OP50Presure { get; set; }
        public int OP50Leakage { get; set; }
        public string OP50Result { get; set; }
        public string OP60Code { get; set; }
        public string OP60Picture { get; set; }
        public string OP60Result { get; set; }
    }


    public class ProductionQueryContext : DbContext
    {
        public ProductionQueryContext() : base("ProductionConnection") { }
        public virtual DbSet<ProductIdentity> Product { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
        }
    }
}
